package org.chen.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.chen.common.system.province.Attraction;
import org.chen.common.system.province.ProvinceCapital;
import org.chen.system.mapper.AttractionMapper;
import org.chen.system.service.AttractionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AttractionServiceImpl extends ServiceImpl<AttractionMapper, Attraction>
    implements AttractionService {
    
    @Resource
    private AttractionMapper attractionMapper;
    
    @Override
    public ProvinceCapital findCapitalIdByAttractionName(String attractionName) {
        return attractionMapper.findCapitalIdByAttractionName(attractionName);
    }

    @Override
    public List<Attraction> getAttractionsByCapitalId(Long capitalId) {
        return attractionMapper.getAttractionsByCapitalId(capitalId);
    }

    @Override
    public ProvinceCapital findCapitalIdByPlatformId(String platform, String platformId) {
        return attractionMapper.findCapitalIdByPlatformId(platform, platformId);
    }

    @Override
    public ProvinceCapital findCapitalIdByAttractionPlatformId(String platform, String platformId) {
        return attractionMapper.findCapitalIdByAttractionPlatformId(platform, platformId);
    }


}